package com.hongpu.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 收款发票信息
 * @TableName hp_project_work_pay_list_receive_payment
 */
@TableName(value ="hp_project_work_pay_list_receive_payment")
@Data
public class HpProjectWorkPayListReceivePayment implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 项目的回款与支出明细表的ID
     */
    @TableField(value = "hp_project_work_pay_list_id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long hpProjectWorkPayListId;

    /**
     * 是否开发票。1=是，0=否
     */
    @TableField(value = "invoice_or_not")
    private Integer invoiceOrNot;

    /**
     * 发票类型；1=普票。2=增值税
     */
    @TableField(value = "invoice_type")
    private Integer invoiceType;

    /**
     * 发票税率
     */
    @TableField(value = "invoice_tax_rate")
    private BigDecimal invoiceTaxRate;

    /**
     * 不含税金额
     */
    @TableField(value = "amount_before_tax")
    private BigDecimal amountBeforeTax;

    /**
     * 税额
     */
    @TableField(value = "the_amount_of_tax_to_be_paid")
    private BigDecimal theAmountOfTaxToBePaid;

    /**
     * 发票是否已经开出去。1=已开，0=未开
     */
    @TableField(value = "it_has_been_invoiced")
    private Integer itHasBeenInvoiced;

    /**
     * 数据生成时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 录入人员的ID
     */
    @TableField(value = "create_by",fill = FieldFill.INSERT)
    private Long createBy;

    /**
     * 逻辑删除；1=逻辑已删除值；0=逻辑未删除值
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 数据修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    /**
     * 数据修改操作人ID
     */
    @TableField(value = "update_by",fill = FieldFill.UPDATE)
    private Long updateBy;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long tenantId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HpProjectWorkPayListReceivePayment other = (HpProjectWorkPayListReceivePayment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getHpProjectWorkPayListId() == null ? other.getHpProjectWorkPayListId() == null : this.getHpProjectWorkPayListId().equals(other.getHpProjectWorkPayListId()))
            && (this.getInvoiceOrNot() == null ? other.getInvoiceOrNot() == null : this.getInvoiceOrNot().equals(other.getInvoiceOrNot()))
            && (this.getInvoiceType() == null ? other.getInvoiceType() == null : this.getInvoiceType().equals(other.getInvoiceType()))
            && (this.getInvoiceTaxRate() == null ? other.getInvoiceTaxRate() == null : this.getInvoiceTaxRate().equals(other.getInvoiceTaxRate()))
            && (this.getAmountBeforeTax() == null ? other.getAmountBeforeTax() == null : this.getAmountBeforeTax().equals(other.getAmountBeforeTax()))
            && (this.getTheAmountOfTaxToBePaid() == null ? other.getTheAmountOfTaxToBePaid() == null : this.getTheAmountOfTaxToBePaid().equals(other.getTheAmountOfTaxToBePaid()))
            && (this.getItHasBeenInvoiced() == null ? other.getItHasBeenInvoiced() == null : this.getItHasBeenInvoiced().equals(other.getItHasBeenInvoiced()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getHpProjectWorkPayListId() == null) ? 0 : getHpProjectWorkPayListId().hashCode());
        result = prime * result + ((getInvoiceOrNot() == null) ? 0 : getInvoiceOrNot().hashCode());
        result = prime * result + ((getInvoiceType() == null) ? 0 : getInvoiceType().hashCode());
        result = prime * result + ((getInvoiceTaxRate() == null) ? 0 : getInvoiceTaxRate().hashCode());
        result = prime * result + ((getAmountBeforeTax() == null) ? 0 : getAmountBeforeTax().hashCode());
        result = prime * result + ((getTheAmountOfTaxToBePaid() == null) ? 0 : getTheAmountOfTaxToBePaid().hashCode());
        result = prime * result + ((getItHasBeenInvoiced() == null) ? 0 : getItHasBeenInvoiced().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", hpProjectWorkPayListId=").append(hpProjectWorkPayListId);
        sb.append(", invoiceOrNot=").append(invoiceOrNot);
        sb.append(", invoiceType=").append(invoiceType);
        sb.append(", invoiceTaxRate=").append(invoiceTaxRate);
        sb.append(", amountBeforeTax=").append(amountBeforeTax);
        sb.append(", theAmountOfTaxToBePaid=").append(theAmountOfTaxToBePaid);
        sb.append(", itHasBeenInvoiced=").append(itHasBeenInvoiced);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", deleted=").append(deleted);
        sb.append(", remark=").append(remark);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", tenantId=").append(tenantId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}